package org.example.huawei;

import java.util.HashSet;
import java.util.Map;
import java.util.Scanner;
import java.util.Set;

public class Main {
    private static Set<Double> doubles = new HashSet<>();
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int m = input.nextInt();
        // i,j,k 3,4,5
        StringBuilder res = new StringBuilder();
        for (int i = n; i < m; i++) {
            for (int j = i; j < m; j++) {
                int r = i * i + j * j;
                for (int k = j; k < m; k++) {
                    if (k * k == r) {
                        //判断互质
                        if (isResult(i, j, k)) {
                           res.append(i).append(" ").append(j).append(" ").append(k).append("\n");
                        }
                    }
                }
            }
        }
        if (res.toString().equals("")) {
            System.out.println("NA");
        } else {
            System.out.println(res.toString());
        }
    }

    private static boolean isResult(int i, int j, int k) {
        return isResult(i, j) && isResult(i, k) && isResult(j, k);
    }

    private static boolean isResult(int i, int j) {

        for (double m = 2; m < i; m++) {
            double x = i / m;
            double y = j / m;
            int a = (int) x;
            int b = (int) y;
            double r1 = x / a;
            double r2 = y / b;
            if (r1 == 1.0 && r2 == 1.0) {
                return false;
            }
        }
        return true;
    }
}
